package week3;

public class Ex28 {
    public static void main(String[] args) {
        int m = 1001;
        long ans = 1;
        long temp = 1;
        long lines = 2;
        for (int i = 0; i < m / 2; ++i){
            for (int j = 1; j <= 4; ++j){
                temp += lines;
                ans += temp;
            }
            lines += 2;
        }
        System.out.println(ans);
    }
}
